﻿using Candy.Web;
using Candy.Web.Data;
using System;
using System.ServiceModel.DomainServices.Client.ApplicationServices;

namespace Candy.Model
{
    public interface IUserManager
    {
        AuthUser AuthenticatedUser {get;}

        void LoginAsync(LoginParameters user, Action<LoginOperation> loginAction);
        void LogoutAsync(Action<LogoutOperation> logoutAction);
        void RegisterAsync(RegistrationData regData, string password, Action<CandyInvokeOperation<CreateUserStatus>> registerAction);

        event EventHandler LoggedOut;
        event EventHandler LoggedIn;
    }
}
